﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.AssignDataFromTC.BLModel.BomLineModel
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using System.Collections.ObjectModel;
using System.ComponentModel;


namespace DnProcessSimulateCommands.AssignDataFromTC.BLModel;

public class BomLineModel : INotifyPropertyChanged
{
  private ObservableCollection<BomLine> _bomLines = new ObservableCollection<BomLine>();
  private ObservableCollection<string> _propertyNiceNames = new ObservableCollection<string>();

  public event PropertyChangedEventHandler PropertyChanged;

  private void OnPropertyChanged(string propertyName)
  {
    PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
    if (propertyChanged == null)
      return;
    propertyChanged((object) this, new PropertyChangedEventArgs(propertyName));
  }

  public ObservableCollection<BomLine> BomLines
  {
    get => this._bomLines;
    set
    {
      if (this._bomLines == value)
        return;
      this._bomLines = value;
    }
  }

  public void AddBomLine(BomLine bomLine) => this._bomLines.Add(bomLine);

  public ObservableCollection<string> PropertyNiceNames
  {
    get => this._propertyNiceNames;
    set
    {
      if (this._propertyNiceNames == value)
        return;
      this._propertyNiceNames = value;
      this.OnPropertyChanged(nameof (PropertyNiceNames));
    }
  }
}
